package com.gy.spring.mvc.common.tools;

import org.junit.Test;

import com.gy.spring.mvc.common.interceptor.MyException;

public class RTest {

    @Test
    public void testOk() {
        System.out.println("1: " + R.ok());
    }

    @Test
    public void testOkObject() {
        System.out.println("2: " + R.ok("数据DATA"));
    }

    @Test
    public void testErr() {
        System.out.println("3: " + R.err());
    }

    @Test
    public void testErrString() {
        System.out.println("4: " + R.err("错误MSG"));
    }

    @Test
    public void testErrIntString() {
        System.out.println("5: " + R.err(505, "错误MSG"));
    }

    @Test
    public void testErrMyException() {
        System.out.println("6: " + R.err(new MyException(510, "错误MSG")));
    }

}
